import java.util.Scanner;

public class A {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int x = sc.nextInt();
		int y = sc.nextInt();
		int z = sc.nextInt();
		
		if(z >= Math.min(x, y) && z <= Math.max(x, y)) {
			System.out.print("Yes");
		} else {
			System.out.print("No");
		}
	}
}
